﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.WindowsAzure.StorageClient;

namespace ToDoWebRole
{
    public class IdentityDataModel : TableServiceEntity
    {
        /**/
        
            public IdentityDataModel(string partitionKey, string rowKey)
                : base(partitionKey, rowKey)
            {
                //Obviously, not generally a good pattern, but since we know pk is GUID...
                this.ID = partitionKey;
            }

            public IdentityDataModel(string name)
                : this()
            {
                this.ID = name;
            }

            public IdentityDataModel()
                : this(Guid.NewGuid().ToString(), String.Empty)
            {
            }

            public string ID
            {
                get;
                set;
            }

            public int UserId { get; set; }
            public int GroupId { get; set; }
           // public string longitude { get; set; }
           // public string Type { get; set; }
            //public string Predecessor { get; set; }

            /* internal void Add(ToDoDataModel t)
             {
                 t.Parent = this.ID;
             }

             internal void Follows(ToDoDataModel td)
             {
                 this.Predecessor = td.ID;
             }*/

            public readonly static string ROOT_ID = "_ROOT";
        
    }
        /**/
    }
